<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'd.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	<%
  		List<String> list = new ArrayList<String>();
  		list.add("a");
  		request.setAttribute("list", list);
  	%>
	<h1>EL函数库</h1>
	${fn:toUpperCase("abc") }<br/>
	${fn:toLowerCase("ABC") }<br/>
	${fn:indexOf("helloworld","world") }<br/>
	${fn:contains("helloworld","world") }&nbsp;${fn:contains(list,"a") }<br/>
	${fn:containsIgnoreCase("helloworld","WORLD") }<br/>
	${fn:startsWith("helloworld","hello") }<br/>
	${fn:endsWith("helloworld","world") }<br/>
	${fn:substring("helloworld",3,8) }&nbsp;${fn:substring("helloworld",3,-1) }<br/>
	${fn:substringAfter("helloworld","hello") }<br/>
	${fn:substringBefore("helloworld","world") }<br/>
	${fn:escapeXml("<input type='text'></input>&nbsp;<script type=\"text/javascript\"></script>") }<br/>
	${fn:trim(" hello world    ") }<br/>
	${fn:replace("hello-world","-"," ") }<br/>
	${fn:split("hello-world","-")[0] }<br/>
	${fn:length(fn:split("hello-world","-")) }&nbsp;${fn:length(list) }<br/>
	${fn:join(fn:split("hello-world","-"),'~') }<br/>
  </body>
</html>
